/* 基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f7fa;
  padding: 20px;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

header {
  background: linear-gradient(135deg, #2c3e50 0%, #1a2530 100%);
  color: white;
  padding: 25px 30px;
  text-align: center;
}

header h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

header p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

main {
  padding: 25px;
}

section {
  margin-bottom: 30px;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

h2 {
  color: #2c3e50;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #eaeaea;
}

/* 表单样式 */
.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #34495e;
}
.tips {
  color: #ccc;
}

input[type="text"],
input[type="number"] {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="number"]:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 10px 20px;
  background: #ecf0f1;
  color: #34495e;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-right: 10px;
  margin-top: 5px;
}

.btn:hover {
  background: #d6dbdf;
  transform: translateY(-2px);
}

.btn.primary {
  background: linear-gradient(135deg, #3498db 0%, #1a5276 100%);
  color: white;
}

.btn.primary:hover {
  background: linear-gradient(135deg, #2980b9 0%, #154360 100%);
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.btn.large {
  padding: 15px 30px;
  font-size: 1.1rem;
}

/* 命名规则表格 */
.rules-container {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #2c3e50;
}

tr:nth-child(even) {
  background-color: #f8f9fa;
}

.rule-key,
.rule-value {
  width: 100%;
  padding: 6px;
  box-sizing: border-box;
}

.naming-rules .btn {
  margin-bottom: 10px;
}

#namingRulesTable .small {
  font-size: 12px;
  padding: 4px 8px;
}

/* 状态指示器 */
.status {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.status-indicator {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-right: 10px;
}

.status-indicator.idle {
  background-color: #95a5a6;
}

.status-indicator.processing {
  background-color: #f39c12;
  animation: pulse 1.5s infinite;
}

.status-indicator.success {
  background-color: #2ecc71;
}

.status-indicator.error {
  background-color: #e74c3c;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

/* 统计信息 */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}

.stat-item {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  color: #7f8c8d;
  margin-bottom: 5px;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2c3e50;
}

/* 日志区域 */
.log-container {
  background: #2c3e50;
  color: #ecf0f1;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
  max-height: 300px;
  overflow-y: auto;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.9rem;
  line-height: 1.5;
}

.log-container pre {
  white-space: pre-wrap;
  word-break: break-word;
}

/* 页脚 */
footer {
  padding: 20px;
  text-align: center;
  background: #f8f9fa;
  border-top: 1px solid #e0e0e0;
  color: #7f8c8d;
  font-size: 0.9rem;
}

footer p:first-child {
  margin-bottom: 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    border-radius: 0;
  }

  header {
    padding: 20px 15px;
  }

  header h1 {
    font-size: 1.8rem;
  }

  main {
    padding: 15px;
  }

  section {
    padding: 15px;
  }

  .stats {
    grid-template-columns: 1fr;
  }
}
